<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Document</title>
    <style>
        .con {
            width: 100px;
            height: 100px;
            background: red;
        }

        .v-enter {
            background: palegoldenrod;
        }

        .v-enter-active {
            background: palegreen;
            transition:all 2s linear;
        }

        .v-enter-to {
            background: palevioletred;
        }
        /* 进入状态结束后，会变成默认的颜色 */

        .v-leave {
            background: bisque;
        }

        .v-leave-active {
            background: blueviolet;
            transition:all 2s linear;
        }

        .v-leave-to {
            background: burlywood;
        }
        /* 离开状态结束后是消失 */
    </style>
</head>

<body>
    <div id="app">
        <button @click="change">按钮</button>
        <transition>
            <div v-if="isShow" class="con"></div>
        </transition>

    </div>
</body>

</html>
<script src="vue.js"></script>
<script>
    let vm = new Vue({
        el: "#app",
        data: {
            isShow: false
        },
        methods: {
            
        }
    })
</script>